<!--********************************************************************
* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title data-i18n="resources.title_overviewmap"></title>
    <script type="text/javascript" src="../js/include-web.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" exclude="iclient-classic" src="../../dist/classic/include-classic.js"></script>
<script type="text/javascript">
    var host = window.isLocal ? window.server : "http://support.supermap.com.cn:8090";
    var map, layerWorld;
    var url = host + "/iserver/services/map-world/rest/maps/World";

    map = new SuperMap.Map("map", {
        controls: [
            new SuperMap.Control.Navigation({
                dragPanOptions: {
                    enableKinetic: true
                }
            })]
    });
    //初始化鹰眼控件类
    overviewmap = new SuperMap.Control.OverviewMap();
    //属性minRectSize：鹰眼范围矩形边框的最小的宽度和高度。默认为8pixels
    overviewmap.minRectSize = 20;
    layerWorld = new SuperMap.Layer.TiledDynamicRESTLayer("World", url);     //获取图层服务地址
    layerWorld.events.on({"layerInitialized": addLayer});
    //添加地图图层、鹰眼控件到map
    function addLayer() {
        map.addLayers([layerWorld]);
        map.addControl(overviewmap);
        map.setCenter(new SuperMap.LonLat(118, 40), 6);
    }
</script>
</body>
</html>